package heap;

/**
 * @author ZhengDp
 * @Date 2023/5/12 15:59
 * @Description 堆内存诊断案例
 */
public class Heap_Demo2 {
    public static void main(String[] args) throws InterruptedException {
        System.out.println("1 ... ");
        Thread.sleep(30000);
        byte[] array = new byte[1024 * 1024 * 10]; // 10 mb
        System.out.println("2 ....");
        Thread.sleep(20000);
        array = null;
        System.gc();
        System.out.println("3 .... ");
        Thread.sleep(1000000L);
    }
}
